package top.z.work.module.system.controller.dept.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

@Data
@Accessors(chain = true)
@Schema(description = "系统管理 - 创建部门数据 VO")
public class SystemDeptCreateVO {

    @NotNull(message = "上级ID不能为空")
    @Schema(description = "上级ID", example = "0")
    private Long parent;

    @Length(min = 2, max = 30, message = "部门名称长度只能在 2 到 30 个字符之间")
    @NotBlank(message = "部门名称不能为空")
    @Schema(description = "部门名称", example = "研发部")
    private String name;

    @Min(value = 0, message = "显示顺序不能小于 0")
    @Max(value = 99999, message = "显示顺序不能大于 99999")
    @NotNull(message = "显示顺序不能为空")
    @Schema(description = "显示顺序", example = "1")
    private Integer sort;

}
